import { AppDataSource } from "./data-source"
import webService from "./services/web_service";
import logger from "./utils/logger-utils";
import { PORT, HOST } from "./utils/address-utils";
import "reflect-metadata";


//官方文档 https://typeorm.bootcss.com/
AppDataSource.initialize().then(async () => {

    webService.listen(PORT, () => {
        console.log(`启动成功 : http://${HOST}:${PORT}/`)
        logger.info(`启动成功 : http://${HOST}:${PORT}/`)
    })
    
}).catch(error => console.log(error))


